<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>订单详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
</head>
<body>
<div class="x-body">
    <form class="layui-form">
        <div class="layui-form-item">

            <div class="layui-userinfo">
                <table style="font-size: 20px">
                    <tr>
                        <td>产品编号：</td>
                        <td><input style="border:none;outline:medium;" readonly="readonly" class="orderId" /></td>
                    </tr>
                    <tr>
                        <td>产品名称：</td>
                        <td><input style="border:none;outline:medium;" readonly="readonly" class="orderTime" /></td>
                    </tr>
                    <tr>
                        <td>产品数量：</td>
                        <td><input style="border:none;outline:medium;" readonly="readonly" class="carPlate" /></td>
                    </tr>
                    <tr>
                        <td>产品价格：</td>
                        <td><input style="border:none;outline:medium;" readonly="readonly" class="customerName" /></td>
                    </tr>
                    <tr>
                        <td>产品图片：</td>
                        <td><input style="border:none;outline:medium;" readonly="readonly" class="customerPhone" /></td>
                    </tr>
                    <tr>
                        <td>产品类型编号：</td>
                        <td><input style="border:none;outline:medium;" readonly="readonly" class="orderStatus" /></td>
                    </tr>

                </table>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label"></label>
            <button  class="layui-btn" lay-filter="add" lay-submit="">
                返回列表
            </button>
        </div>
    </form>
</div>

<script>

    $(function () {
        $.ajax({
            url:"http://admin.516code.cn/backstage/selectAllPro.do",
            type:"post",
            dataType:"json",
            success:function (data) {
                for (i in data.data){
                    var str;
                    str='<td><div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id=\'+i+\'><i class="layui-icon">&#xe605;</i></div></td>'
                        +'<td>'+data.data[i].productId+'</td>'+'<td>'+data.data[i].productName+'</td>'
                        +'<td>'+data.data[i].productNum+'</td>'+'<td>'+data.data[i].productPrice+'</td>'
                        +'<td>'+data.data[i].productImg+'</td>'+'<td>'+data.data[i].productTypeId+'</td>'
                        +'<td>'+$(".td-manage").html()+'</td>'
                    $("#tal").append('<tr>'+str+'</tr>')
                }
            }
        })
    })

    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form
            ,layer = layui.layer;


        //监听提交
        form.on('submit(add)', function(data){
            console.log(data);
            //发异步，把数据提交给php
            // layer.alert("增加成功", {icon: 6},function () {
            // 获得frame索引
            var index = parent.layer.getFrameIndex(window.name);
            //关闭当前frame
            parent.layer.close(index);
            //});
            return false;
        });


    });
</script>

</body>
</html>
